Adjustable current sink to draw compensation current from high voltage generation circuitry during programming operation of analog neural memory in deep learning artificial neural network

ABSTRACT

Numerous embodiments are disclosed for a high voltage generation algorithm and system for generating high voltages necessary for a particular programming operation in analog neural memory used in a deep learning artificial neural network. Different calibration algorithms and systems are also disclosed. Compensation measures are utilized to compensate for changes in voltage or current as the number of cells being programmed changes.

PRIORITY CLAIMS

This application is a divisional of U.S. patent application Ser. No.16/042,972, filed on Jul. 23, 2018, and titled “Method and Apparatus forHigh Voltage Generation for Analog Neural Memory in Deep LearningArtificial Neural Network,” which claims priority to U.S. ProvisionalPatent Application No. 62/665,359, filed on May 1, 2018, and titled“Method and Apparatus for High Voltage Generation for Analog NeuralMemory in Deep Learning Artificial Neural Network,” both of which areincorporated herein by reference.

FIELD OF THE INVENTION

Numerous embodiments are disclosed for a high voltage generationalgorithm and system for generating high voltages necessary for aparticular programming operation in analog neural memory used in a deeplearning artificial neural network.

BACKGROUND OF THE INVENTION

Artificial neural networks mimic biological neural networks (e.g., thecentral nervous systems of animals, in particular the brain) which areused to estimate or approximate functions that can depend on a largenumber of inputs and are generally unknown. Artificial neural networksgenerally include layers of interconnected “neurons” which exchangemessages between each other.

FIG. 1 illustrates an artificial neural network, where the circlesrepresent the inputs or layers of neurons. The connections (calledsynapses) are represented by arrows, and have numeric weights that canbe tuned based on experience. This makes neural networks adaptive toinputs and capable of learning. Typically, neural networks include alayer of multiple inputs. There are typically one or more intermediatelayers of neurons, and an output layer of neurons that provide theoutput of the neural network. The neurons at each level individually orcollectively make a decision based on the received data from thesynapses.

One of the major challenges in the development of artificial neuralnetworks for high-performance information processing is a lack ofadequate hardware technology. Indeed, practical neural networks rely ona very large number of synapses, enabling high connectivity betweenneurons, i.e. a very high computational parallelism. In principle, suchcomplexity can be achieved with digital supercomputers or specializedgraphics processing unit clusters. However, in addition to high cost,these approaches also suffer from mediocre energy efficiency as comparedto biological networks, which consume much less energy primarily becausethey perform low-precision analog computation. CMOS analog circuits havebeen used for artificial neural networks, but most CMOS-implementedsynapses have been too bulky given the high number of neurons andsynapses.

Applicant previously disclosed an artificial (analog) neural networkthat utilizes one or more non-volatile memory arrays as the synapses inU.S. patent application Ser. No. 15/594,439, which is incorporated byreference. The non-volatile memory arrays operate as analog neuromorphicmemory. The neural network device includes a first plurality of synapsesconfigured to receive a first plurality of inputs and to generatetherefrom a first plurality of outputs, and a first plurality of neuronsconfigured to receive the first plurality of outputs. The firstplurality of synapses includes a plurality of memory cells, wherein eachof the memory cells includes spaced apart source and drain regionsformed in a semiconductor substrate with a channel region extendingthere between, a floating gate disposed over and insulated from a firstportion of the channel region and a non-floating gate disposed over andinsulated from a second portion of the channel region. Each of theplurality of memory cells is configured to store a weight valuecorresponding to a number of electrons on the floating gate. Theplurality of memory cells is configured to multiply the first pluralityof inputs by the stored weight values to generate the first plurality ofoutputs.

Each non-volatile memory cells used in the analog neuromorphic memorysystem must be erased and programmed to hold a very specific and preciseamount of charge in the floating gate. For example, each floating gatemust hold one of N different values, where N is the number of differentweights that can be indicated by each cell. Examples of N include 16,32, and 64.

One challenge in VMM systems is the fact that the amount of totalvoltage and total current required for a programming operation isconstantly changing, as the number of cells being programmed changes aswell as the relative amount of charge being stored in each cell. Theseextreme variations in voltage and current can result in drastic changesin operating temperature and energy consumption.

What is needed is a high voltage generation system that compensates forthe changes in voltage and current needs of the system based on thenumber of cells to be programmed at any given time.

SUMMARY OF THE INVENTION

Numerous embodiments are disclosed for a high voltage generationalgorithm and system for generating high voltages necessary for aparticular programming operation in analog neural memory used in a deeplearning artificial neural network.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram that illustrates an artificial neural network.

FIG. 2 is a cross-sectional side view of a conventional 2-gatenon-volatile memory cell.

FIG. 3 is a cross-sectional side view of a conventional 4-gatenon-volatile memory cell.

FIG. 4 is a side cross-sectional side view of conventional 3-gatenon-volatile memory cell.

FIG. 5 is a cross-sectional side view of another conventional 2-gatenon-volatile memory cell.

FIG. 6 is a diagram illustrating the different levels of an exemplaryartificial neural network utilizing a non-volatile memory array.

FIG. 7 is a block diagram illustrating a vector multiplier matrix.

FIG. 8 is a block diagram illustrating various levels of a vectormultiplier matrix.

FIG. 9 depicts another embodiment of a vector multiplier matrix.

FIG. 10 depicts another embodiment of a vector multiplier matrix.

FIG. 11 depicts operating voltages to perform operations on the vectormultiplier matrix of FIG. 10.

FIG. 12 depicts another embodiment of a vector multiplier matrix.

FIG. 13 depicts operating voltages to perform operations on the vectormultiplier matrix of FIG. 12.

FIG. 14 depicts another embodiment of a vector multiplier matrix.

FIG. 15 depicts operating voltages to perform operations on the vectormultiplier matrix of FIG. 14.

FIG. 16 depicts another embodiment of a vector multiplier matrix.

FIG. 17 depicts operating voltages to perform operations on the vectormultiplier matrix of FIG. 216.

FIG. 18 depicts a memory system comprising a vector multiplier matrix.

FIGS. 19A, 19B, and 19C depict an algorithm for programming one or morememory cells in a vector multiplier matrix.

FIG. 20 depicts a calibration algorithm to generate a look-up table usedduring the programming of one or more memory cells in a vectormultiplier matrix.

FIG. 21 depicts waveforms for the voltage applied during differentprogramming embodiments.

FIG. 22 depicts waveforms for the voltage applied during differentprogramming embodiments.

FIG. 23 depicts waveforms for the voltage applied during differentprogramming embodiments.

FIG. 24 depicts a high voltage generation block for used with a vectormultiplier matrix system.

FIG. 25 depicts a charge pump and charge pump regulation circuit.

FIG. 26 depicts a high voltage generation block with a currentcompensation circuit.

FIG. 27 depicts another high voltage generation block with a currentcompensation circuit.

FIG. 28 depicts another high voltage generation block.

FIG. 29 depicts dummy bit lines for providing current compensation.

FIG. 30 depicts a high voltage decoder.

FIG. 31 depicts a high voltage test circuit.

FIG. 32 depicts a high voltage generation block.

FIG. 33 depicts another high voltage generation block.

FIG. 34 depicts another high voltage generation block.

FIG. 35 depicts a high voltage operational amplifier.

FIG. 36 depicts another high voltage operational amplifier.

FIG. 37 depicts a column driver.

FIG. 38 depicts a column sense amplifier.

FIG. 39 depicts a read reference circuit.

FIG. 40 depicts another read reference circuit.

DETAILED DESCRIPTION OF THE INVENTION

The artificial neural networks of the present invention utilize acombination of CMOS technology and non-volatile memory arrays.

Non-Volatile Memory Cells

Digital non-volatile memories are well known. For example, U.S. Pat. No.5,029,130 (“the '130 patent”) discloses an array of split gatenon-volatile memory cells, and is incorporated herein by reference forall purposes. Such a memory cell is shown in FIG. 2. Each memory cell210 includes source region 14 and drain region 16 formed in asemiconductor substrate 12, with a channel region 18 there between. Afloating gate 20 is formed over and insulated from (and controls theconductivity of) a first portion of the channel region 18, and over aportion of the source region 16. A word line terminal 22 (which istypically coupled to a word line) has a first portion that is disposedover and insulated from (and controls the conductivity of) a secondportion of the channel region 18, and a second portion that extends upand over the floating gate 20. The floating gate 20 and word lineterminal 22 are insulated from the substrate 12 by a gate oxide. Bitline24 is coupled to drain region 16.

Memory cell 210 is erased (where electrons are removed from the floatinggate) by placing a high positive voltage on the word line terminal 22,which causes electrons on the floating gate 20 to tunnel through theintermediate insulation from the floating gate 20 to the word lineterminal 22 via Fowler-Nordheim tunneling.

Memory cell 210 is programmed (where electrons are placed on thefloating gate) by placing a positive voltage on the word line terminal22, and a positive voltage on the source 16. Electron current will flowfrom the source 16 towards the drain 14. The electrons will accelerateand become heated when they reach the gap between the word line terminal22 and the floating gate 20. Some of the heated electrons will beinjected through the gate oxide 26 onto the floating gate 20 due to theattractive electrostatic force from the floating gate 20.

Memory cell 210 is read by placing positive read voltages on the drain14 and word line terminal 22 (which turns on the channel region underthe word line terminal). If the floating gate 20 is positively charged(i.e. erased of electrons and positively coupled to the drain 16), thenthe portion of the channel region under the floating gate 20 is turnedon as well, and current will flow across the channel region 18, which issensed as the erased or “1” state. If the floating gate 20 is negativelycharged (i.e. programmed with electrons), then the portion of thechannel region under the floating gate 20 is mostly or entirely turnedoff, and current will not flow (or there will be little flow) across thechannel region 18, which is sensed as the programmed or “0” state.

Table No. 1 depicts typical voltage ranges that can be applied to theterminals of memory cell 210 for performing read, erase, and programoperations:

TABLE NO. 1 Operation of Flash Memory Cell 210 of FIG. 2 WL BL SL Read2-3 V 0.6-2 V 0 V Erase ~11-13 V    0 V 0 V Program 1-2 V 1-3 μA 9-10V   

Other split gate memory cell configurations are known. For example, FIG.3 depicts four-gate memory cell 310 comprising source region 14, drainregion 16, floating gate 20 over a first portion of channel region 18, aselect gate 28 (typically coupled to a word line) over a second portionof the channel region 18, a control gate 22 over the floating gate 20,and an erase gate 30 over the source region 14. This configuration isdescribed in U.S. Pat. No. 6,747,310, which is incorporated herein byreference for all purposes). Here, all gates are non-floating gatesexcept floating gate 20, meaning that they are electrically connected orconnectable to a voltage source. Programming is shown by heatedelectrons from the channel region 18 injecting themselves onto thefloating gate 20. Erasing is shown by electrons tunneling from thefloating gate 20 to the erase gate 30.

Table No. 2 depicts typical voltage ranges that can be applied to theterminals of memory cell 310 for performing read, erase, and programoperations:

TABLE NO. 2 Operation of Flash Memory Cell 310 of FIG. 3 WL/SG BL CG EGSL Read 1.0-2 V 0.6-2 V 0-2.6 V 0-2.6 V 0 V Erase −0.5 V/0 V 0 V 0 V/−8V  8-12 V 0 V Program   1 V 1 μA  8-11 V 4.5-9 V 4.5-5 V    

FIG. 4 depicts split gate three-gate memory cell 410. Memory cell 410 isidentical to the memory cell 310 of FIG. 3 except that memory cell 410does not have a separate control gate. The erase operation (erasingthrough erase gate) and read operation are similar to that of the FIG. 3except there is no control gate bias. The programming operation also isdone without the control gate bias, hence the program voltage on thesource line is higher to compensate for lack of control gate bias.

Table No. 3 depicts typical voltage ranges that can be applied to theterminals of memory cell 410 for performing read, erase, and programoperations:

TABLE NO. 3 Operation of Flash Memory Cell 410 of FIG. 4 WL/SG BL EG SLRead 0.7-2.2 V 0.6-2 V 0-2.6 V  0 V Erase −0.5V/0 V 0 V 11.5 V 0 VProgram    1 V 2-3 μA  4.5 V 7-9 V 

FIG. 5 depicts stacked gate memory cell 510. Memory cell 510 is similarto memory cell 210 of FIG. 2, except floating gate 20 extends over theentire channel region 18, and control gate 22 extends over floating gate20, separated by an insulating layer. The erase, programming, and readoperations operate in a similar manner to that described previously formemory cell 210.

Table No. 4 depicts typical voltage ranges that can be applied to theterminals of memory cell 510 for performing read, erase, and programoperations:

TABLE NO. 4 Operation of Flash Memory Cell 510 of FIG. 5 CG BL SL P-subRead 2-5 V 0.6-2 V 0 V 0 V Erase −8 to −10 V/0 V FLT FLT 8-10 V/15-20 VProgram 8-12 V   3-5 V 0 V 0 V

In order to utilize the memory arrays comprising one of the types ofnon-volatile memory cells described above in an artificial neuralnetwork, two modifications are made. First, the lines are configured sothat each memory cell can be individually programmed, erased, and readwithout adversely affecting the memory state of other memory cells inthe array, as further explained below. Second, continuous (analog)programming of the memory cells is provided.

Specifically, the memory state (i.e. charge on the floating gate) ofeach memory cells in the array can be continuously changed from a fullyerased state to a fully programmed state, independently and with minimaldisturbance of other memory cells. In another embodiment, the memorystate (i.e., charge on the floating gate) of each memory cell in thearray can be continuously changed from a fully programmed state to afully erased state, and vice-versa, independently and with minimaldisturbance of other memory cells. This means the cell storage is analogor at the very least can store one of many discrete values (such as 16or 64 different values), which allows for very precise and individualtuning of all the cells in the memory array, and which makes the memoryarray ideal for storing and making fine tuning adjustments to thesynapsis weights of the neural network.

Neural Networks Employing Non-Volatile Memory Cell Arrays

FIG. 6 conceptually illustrates a non-limiting example of a neuralnetwork utilizing a non-volatile memory array. This example uses thenon-volatile memory array neural net for a facial recognitionapplication, but any other appropriate application could be implementedusing a non-volatile memory array based neural network.

S0 is the input, which for this example is a 32×32 pixel RGB image with5 bit precision (i.e. three 32×32 pixel arrays, one for each color R, Gand B, each pixel being 5 bit precision). The synapses CB1 going from S0to C1 have both different sets of weights and shared weights, and scanthe input image with 3×3 pixel overlapping filters (kernel), shiftingthe filter by 1 pixel (or more than 1 pixel as dictated by the model).Specifically, values for 9 pixels in a 3×3 portion of the image (i.e.,referred to as a filter or kernel) are provided to the synapses CB1,whereby these 9 input values are multiplied by the appropriate weightsand, after summing the outputs of that multiplication, a single outputvalue is determined and provided by a first neuron of CB1 for generatinga pixel of one of the layers of feature map C1. The 3×3 filter is thenshifted one pixel to the right (i.e., adding the column of three pixelson the right, and dropping the column of three pixels on the left),whereby the 9 pixel values in this newly positioned filter are providedto the synapses CB1, whereby they are multiplied by the same weights anda second single output value is determined by the associated neuron.This process is continued until the 3×3 filter scans across the entire32×32 pixel image, for all three colors and for all bits (precisionvalues). The process is then repeated using different sets of weights togenerate a different feature map of C1, until all the features maps oflayer C1 have been calculated.

At C1, in the present example, there are 16 feature maps, with 30×30pixels each. Each pixel is a new feature pixel extracted frommultiplying the inputs and kernel, and therefore each feature map is atwo dimensional array, and thus in this example the synapses CB1constitutes 16 layers of two dimensional arrays (keeping in mind thatthe neuron layers and arrays referenced herein are logicalrelationships, not necessarily physical relationships—i.e., the arraysare not necessarily oriented in physical two dimensional arrays). Eachof the 16 feature maps is generated by one of sixteen different sets ofsynapse weights applied to the filter scans. The C1 feature maps couldall be directed to different aspects of the same image feature, such asboundary identification. For example, the first map (generated using afirst weight set, shared for all scans used to generate this first map)could identify circular edges, the second map (generated using a secondweight set different from the first weight set) could identifyrectangular edges, or the aspect ratio of certain features, and so on.

An activation function P1 (pooling) is applied before going from C1 toS1, which pools values from consecutive, non-overlapping 2×2 regions ineach feature map. The purpose of the pooling stage is to average out thenearby location (or a max function can also be used), to reduce thedependence of the edge location for example and to reduce the data sizebefore going to the next stage. At S1, there are 16 15×15 feature maps(i.e., sixteen different arrays of 15×15 pixels each). The synapses andassociated neurons in CB2 going from S1 to C2 scan maps in S1 with 4×4filters, with a filter shift of 1 pixel. At C2, there are 22 12×12feature maps. An activation function P2 (pooling) is applied beforegoing from C2 to S2, which pools values from consecutive non-overlapping2×2 regions in each feature map. At S2, there are 22 6×6 feature maps.An activation function is applied at the synapses CB3 going from S2 toC3, where every neuron in C3 connects to every map in S2. At C3, thereare 64 neurons. The synapses CB4 going from C3 to the output S3 fullyconnects S3 to C3. The output at S3 includes 10 neurons, where thehighest output neuron determines the class. This output could, forexample, be indicative of an identification or classification of thecontents of the original image.

Each level of synapses is implemented using an array, or a portion of anarray, of non-volatile memory cells. FIG. 7 is a block diagram of thevector-by-matrix multiplication (VMM) array that includes thenon-volatile memory cells, and is utilized as the synapses between aninput layer and the next layer. Specifically, the VMM 32 includes anarray of non-volatile memory cells 33, erase gate and word line gatedecoder 34, control gate decoder 35, bit line decoder 36 and source linedecoder 37, which decode the inputs for the memory array 33. Source linedecoder 37 in this example also decodes the output of the memory cellarray. Alternatively, bit line decoder 36 can decode the output of thememory array. The memory array serves two purposes. First, it stores theweights that will be used by the VMM. Second, the memory arrayeffectively multiplies the inputs by the weights stored in the memoryarray and adds them up per output line (source line or bit line) toproduce the output, which will be the input to the next layer or inputto the final layer. By performing the multiplication and additionfunction, the memory array negates the need for separate multiplicationand addition logic circuits and is also power efficient due to in-situmemory computation.

The output of the memory array is supplied to a differential summer(such as summing op-amp or summing current mirror) 38, which sums up theoutputs of the memory cell array to create a single value for thatconvolution. The differential summer is such as to realize summation ofpositive weight and negative weight with positive input. The summed upoutput values are then supplied to the activation function circuit 39,which rectifies the output. The activation function may include sigmoid,tan h, or ReLU functions. The rectified output values become an elementof a feature map as the next layer (C1 in the description above forexample), and are then applied to the next synapse to produce nextfeature map layer or final layer. Therefore, in this example, the memoryarray constitutes a plurality of synapses (which receive their inputsfrom the prior layer of neurons or from an input layer such as an imagedatabase), and summing op-amp 38 and activation function circuit 39constitute a plurality of neurons.

FIG. 8 is a block diagram of the various levels of VMM. As shown in FIG.8, the input is converted from digital to analog by digital-to-analogconverter 31, and provided to input VMM 32 a. The converted analoginputs could be voltage or current. The input D/A conversion for thefirst layer could be done by using a function or a LUT (look up table)that maps the inputs to appropriate analog levels for the matrixmultiplier. The input conversion could also be done by an A/A Converterto convert an external analog input to a mapped analog input to the VMM.The output generated by the input VMM 32 a is provided as an input tothe next VMM (hidden level 1) 32 b, which in turn generates an outputthat is provided as an input to the next VMM (hidden level 2) 32 b, andso on. The various layers of VMM's 32 function as different layers ofsynapses and neurons of a convolutional neural network (CNN). Each VMMcan be a stand-alone non-volatile memory array, or multiple VMMs couldutilize different portions of the same non-volatile memory array, ormultiple VMMs could utilize overlapping portions of the samenon-volatile memory array. The example shown in FIG. 8 contains fivelayers (32 a,32 b,32 c,32 d,32 e): one input layer (32 a), two hiddenlayers (32 b,32 c), and two fully connected layers (32 d,32 e). One ofordinary skill in the art will appreciate that this is merely exemplaryand that a system instead could comprise more than two hidden layers andmore than two fully connected layers.

Vector-by-Matrix Multiplication (VMM) Arrays

FIG. 9 depicts neuron VMM 900, which is particularly suited for memorycells of the type shown in FIG. 3, and is utilized as the synapses andparts of neurons between an input layer and the next layer. VMM 900comprises a memory array 901 of non-volatile memory cells and referencearray 902 (at the top of the array). Alternatively, another referencearray can be placed at the bottom. In VMM 900, control gates line suchas control gate line 903 run in a vertical direction (hence referencearray 902 in the row direction, orthogonal to the input control gatelines), and erase gate lines such as erase gate line 904 run in ahorizontal direction. Here, the inputs are provided on the control gatelines, and the output emerges on the source lines. In one embodimentonly even rows are used, and in another embodiment, only odd rows areused. The current placed on the source line performs a summing functionof all the currents from the memory cells connected to the source line.

As described herein for neural networks, the flash cells are preferablyconfigured to operate in sub-threshold region.

The memory cells described herein are biased in weak inversion:Ids=Io*e ^((Vg-Vth)/kVt) =w*Io*e ^((Vg)/kVt)w=e ^((−Vth)/kVt)

For an I-to-V log converter using a memory cell to convert input currentinto an input voltage:Vg=k*Vt*log [Ids/wp*Io]

For a memory array used as a vector matrix multiplier VMM, the outputcurrent is:Iout=wa*Io*e ^((Vg)/kVt), namelyIout=(wa/wp)*Iin=W*IinW=e ^((Vthp-Vtha)/kVt)

A wordline or control gate can be used as the input for the memory cellfor the input voltage.

Alternatively, the flash memory cells can be configured to operate inthe linear region:Ids=beta*(Vgs−Vth)*Vds; beta=u*Cox*W/LWα(Vgs−Vth)

For an I-to-V linear converter, a memory cell operating in the linearregion can be used to convert linearly an input/output current into aninput/output voltage.

Other embodiments for the ESF vector matrix multiplier are as describedin U.S. patent application Ser. No. 15/826,345, which is incorporated byreference herein. A sourceline or a bitline can be used as the neuronoutput (current summation output).

FIG. 10 depicts neuron VMM 1000, which is particularly suited for memorycells of the type shown in FIG. 2, and is utilized as the synapsesbetween an input layer and the next layer. VMM 1000 comprises a memoryarray 1003 of non-volatile memory cells, reference array 1001, andreference array 1002. Reference arrays 1001 and 1002, in columndirection of the array, serve to convert current inputs flowing intoterminals BLR0-3 into voltage inputs WL0-3. In effect, the referencememory cells are diode connected through multiplexors with currentinputs flowing into them. The reference cells are tuned (e.g.,programmed) to target reference levels. The target reference levels areprovided by a reference mini-array matrix. Memory array 1003 serves twopurposes. First, it stores the weights that will be used by the VMM1000. Second, memory array 1003 effectively multiplies the inputs(current inputs provided in terminals BLR0-3; reference arrays 1001 and1002 convert these current inputs into the input voltages to supply towordlines WL0-3) by the weights stored in the memory array and then addall the results (memory cell currents) to produce the output, which willbe the input to the next layer or input to the final layer. Byperforming the multiplication and addition function, the memory arraynegates the need for separate multiplication and addition logic circuitsand is also power efficient. Here, the voltage inputs are provided onthe word lines, and the output emerges on the bit line during a read(inference) operation. The current placed on the bit line performs asumming function of all the currents from the memory cells connected tothe bitline.

FIG. 11 depicts operating voltages for VMM 1000. The columns in thetable indicate the voltages placed on word lines for selected cells,word lines for unselected cells, bit lines for selected cells, bit linesfor unselected cells, source lines for selected cells, and source linesfor unselected cells. The rows indicate the operations of read, erase,and program.

FIG. 12 depicts neuron VMM 1200, which is particularly suited for memorycells of the type shown in FIG. 2, and is utilized as the synapses andparts of neurons between an input layer and the next layer. VMM 1200comprises a memory array 1203 of non-volatile memory cells, referencearray 1201, and reference array 1202. The reference array 1201 and 1202run in row direction of the array VMM 1200 is similar to VMM 1000 exceptthat in VMM 1200 the word lines run in the vertical direction. Here, theinputs are provided on the word lines, and the output emerges on thesource line during a read operation. The current placed on the sourceline performs a summing function of all the currents from the memorycells connected to the source line.

FIG. 13 depicts operating voltages for VMM 1200. The columns in thetable indicate the voltages placed on word lines for selected cells,word lines for unselected cells, bit lines for selected cells, bit linesfor unselected cells, source lines for selected cells, and source linesfor unselected cells. The rows indicate the operations of read, erase,and program.

FIG. 14 depicts neuron VMM 1400, which is particularly suited for memorycells of the type shown in FIG. 3, and is utilized as the synapses andparts of neurons between an input layer and the next layer. VMM 1400comprises a memory array 1403 of non-volatile memory cells, referencearray 1401, and reference array 1402. The reference array 1401 and 1402serves to convert current inputs flowing into terminals BLR0-3 intovoltage inputs CG0-3. In effect, the reference memory cells are diodeconnected through cascoding multiplexors 1414 with current inputsflowing into them. The mux 1414 includes a mux 1405 and a cascodingtransistor 1404 to ensure a constant voltage on bitline of referencecells in read. The reference cells are tuned to target reference levels.Memory array 1403 serves two purposes. First, it stores the weights thatwill be used by the VMM 1400. Second, memory array 1403 effectivelymultiplies the inputs (current inputs provided to terminals BLR0-3;reference arrays 1401 and 1402 convert these current inputs into theinput voltages to supply to the control gates CG0-3) by the weightsstored in the memory array and then add all the results (cell currents)to produce the output, which will be the input to the next layer orinput to the final layer. By performing the multiplication and additionfunction, the memory array negates the need for separate multiplicationand addition logic circuits and is also power efficient. Here, theinputs are provided on the word lines, and the output emerges on thebitline during a read operation. The current placed on the bitlineperforms a summing function of all the currents from the memory cellsconnected to the bitline.

VMM 1400 implements uni-directional tuning for memory cells in memoryarray 1403. That is, each cell is erased and then partially programmeduntil the desired charge on the floating gate is reached. If too muchcharge is placed on the floating gate (such that the wrong value isstored in the cell), the cell must be erased and the sequence of partialprogramming operations must start over. As shown, two rows sharing thesame erase gate need to be erased together (to be known as a pageerase), and thereafter, each cell is partially programmed until thedesired charge on the floating gate is reached,

FIG. 15 depicts operating voltages for VMM 1400. The columns in thetable indicate the voltages placed on word lines for selected cells,word lines for unselected cells, bit lines for selected cells, bit linesfor unselected cells, control gates for selected cells, control gatesfor unselected cells in the same sector as the selected cells, controlgates for unselected cells in a different sector than the selectedcells, erase gates for selected cells, erase gates for unselected cells,source lines for selected cells, and source lines for unselected cells.The rows indicate the operations of read, erase, and program.

FIG. 16 depicts neuron VMM 1600, which is particularly suited for memorycells of the type shown in FIG. 3, and is utilized as the synapses andparts of neurons between an input layer and the next layer. VMM 1600comprises a memory array 1603 of non-volatile memory cells, referencearray 1601, and reference array 1602. EG lines are run vertically whileCG and SL lines are run horizontally. VMM 1600 is similar to VMM 1400,except that VMM 1600 implements bi-directional tuning, where eachindividual cell can be completely erased, partially programmed, andpartially erased as needed to reach the desired amount of charge on thefloating gate. As shown, reference arrays 1601 and 1602 convert inputcurrent in the terminal BLR0-3 into control gate voltages CG0-3 (throughthe action of diode-connected reference cells through multiplexors) tobe applied to the memory cells in the row direction. The current output(neuron) is in the bitline which sums all currents from the memory cellsconnected to the bitline.

FIG. 17 depicts operating voltages for VMM 1600. The columns in thetable indicate the voltages placed on word lines for selected cells,word lines for unselected cells, bit lines for selected cells, bit linesfor unselected cells, control gates for selected cells, control gatesfor unselected cells in the same sector as the selected cells, controlgates for unselected cells in a different sector than the selectedcells, erase gates for selected cells, erase gates for unselected cells,source lines for selected cells, and source lines for unselected cells.The rows indicate the operations of read, erase, and program.

FIG. 18 depicts VMM system 1800. VMM system 1800 comprises VMM array1807, low voltage row decoder 1803, high voltage row decoder 1805,reference cell low voltage column decoder 1806 (shown for the referencearray in the column direction, meaning providing input to outputconversion in the row direction), bit line PE driver 1802, bit linemultiplexor 1808, activation function circuit and summer 1809, controllogic 1804, and analog bias circuit 1801.

Low voltage row decoder 1803 provides a bias voltage for read andprogram operations and provides a decoding signal for high voltage rowdecoder 1805. High voltage row decoder 1805 provides a high voltage biassignal for program and erase operations. Bit line PE driver 1801provides controlling function for bit line in program, verify, anderase. Bias circuit 1801 is a shared bias block that provides themultiple voltages needed for the various program, erase, program verify,and read operations.

VMM system 1800 further comprises redundancy array 1810. Redundancyarray 1810 provides array redundancy for replacing a defective arrayportion. VMM system 1800 further comprises NVR (non-volatile register,aka info sector) sectors 1811, which are array sectors used to storeuser info, device ID, password, security key, trimbits, configurationbits, manufacturing info, etc.

VMM system 1800 optionally comprises reference array 1812 and/orreference system 1850. Reference system 1850 comprises reference array1852, reference array low voltage row decoder 1851, reference array highvoltage row decoder 1853, and reference array low voltage column decoder1854. The reference system can be shared across multiple VMM systems.

Reference array low voltage row decoder 1851 provides a bias voltage forread and programming operations involving reference array 1852 and alsoprovides a decoding signal for reference array high voltage row decoder1853. Reference array high voltage row decoder 1853 provides a highvoltage bias for program and operations involving reference array 1852.Reference array low voltage column decoder 1854 provides a decodingfunction for reference array 1852. Reference array 1852 is such as toprovide reference target for program verify or cell margining (searchingfor marginal cells).

FIGS. 19A, 19B, and 19C depict programming method 1900. First, themethod starts (step 1901), which typically occurs in response to aprogram command being received. Next, a mass program operation programsall cells to a ‘0’ state (step 1902). Then a soft erase erases all cellsto an intermediate weakly erased level of approximately 1-5 μA (step1903). This is in contrast to a deep erase that would bring all cells toa fully erased state for digital application, e.g. ˜20-30 uA cellcurrent. Then, a hard program is performed on all unselected cells toremove charge from the cells (step 1904) for un-used cells to a verydeep programmed state, ˜fA-pA, to make sure that the cells are reallyoff, meaning these memory cells are contributing insignificant current.A soft program is then performed on selected cells to remove some chargefrom the cells, to an n intermediate weakly programmed level ofapproximately 0.1-1.5 μA using a coarse algorithm (steps 1905, 1906,1907). A coarse step program cycle followed by a verify operationoccurs, where the charge on a select cells is compared to variousthreshold values in a coarse iterative fashion (steps 1906 and 1907).The coarse step program cycle includes a coarse voltage increment (suchas high voltage level for SL, CG, and EG), and/or coarse program time,and/or coarse program current resulting in a coarse cell current changefrom one program step to the next.

Next, precision programming occurs (step 1908), where all selected cellsare programmed to a target level within a range of 1 pA-20 nA dependingon desired level by a fine step program algorithm. The system checks thenumber of bits to be programmed (step 1909). It determines using a LUT(look up table) or using an approximate function for Vhv(inc) for thenumber of bits to be programmed (step 1910). The Vhv is a high voltagesuch as a high voltage level for SL, CG, and EG, The LUT or a functionis a function of # IOs to be programmed, the I target, and the deltaIcell (=current Icell−previous Icell). It then performs precisionprogramming steps (step 1911). A programming operation is performed(step 1912). A verification step (check Icell vs. Itarget andcalculate/store delta Icell) is then performed (step 1913). If one ormore cells are verified, then the process goes back to step 1909 toprogram the remaining cells. If not, a counter is checked, and if athreshold number of attempts have been made, then the process ends andthe cells are deemed bad. If not, then the programming step 1912 isrepeated. Once all the cells have been verified (step 1914), then theprocess is complete.

FIG. 2000 depicts a high voltage calibration process to build alook-up-table or generate a function to determine the desired voltagelevel required for programming for each possible number of bits to beprogrammed. The starting point is the situation where one bit is to beprogrammed (step 2001). A voltage (such as high voltage level for SL,CG, and EG) is determined for programming that one bit (step 2002) Thenthe number of bits is incremented (step 2003), and the programming stepis repeated (step 2001). Once the process has been performed for N bits(the total number of possible bits to be programmed), the values areprogrammed into a look-up-table (step 2004) to be consulted duringprogramming operations.

FIG. 21 depicts two different approaches to programming operations. Eachoperation includes multiples of a Verify and Program (Vef/Prog) cycle.In the Verify cycle, the I target is checked and the number of IOs to beprogrammed is checked. The HV program level (such as high voltage levelfor SL, CG, and EG) is adjusted basing on the Itarget and the number ofIOs to be programmed. In waveform 2101, the total voltage providedduring a programming operation increases in magnitude as the number ofbits to be programmed increases. Sequence 2101 represents the voltageprovided, through four exemplary pulses, for the situation where threebits are to be programmed. By contrast, in waveform 2103 with HV leveland program time adjustment per Vef/Prog cycle, two pulses of the samemagnitude as in sequence 2101 are provided, but then as an exampleduring Vef/Prog k cycle, less number of bits to be programmed, themagnitude decreases (e.g., dV1neg) and the lesser pulses are providedfor a greater duration (i.e., four pulses of a lower magnitude in 2104instead of two pulses of a higher magnitude in 2101). That is, the sameresult can be achieved with different combinations of voltage magnitudeand duration of application of the pulses. The HV program level of theVef/Prog k cycle is lowered to prevent overshoot the target in nextprogramming cycle due to less bits to be programmed, meaning HV programlevel is higher for next cycle.

FIG. 22 depicts two additional approaches to programming operations. Inwaveform 2201, the total voltage provided during a programming operationstays the same in in magnitude but the length of each programming pulsesincreases as the number of bits to be programmed increases. In waveform2201 with program pulsewidth time adjustment per Vef/Prog cycle, as anexample during Vef/Prog z cycle, less number of bits to be programmed,instead of long pulses (as in the pulse of duration T3 in 2201), thepulses instead are shortened (T1) but are more pulses are applied sothat the total duration is longer than in waveform 2201 for thatparticular programming level. The Vef/Prog z cycle is shortened toprevent overshoot the target in next programming cycle due to less bitsto be programmed, meaning HV program level is higher for next cycle.That is, the same result can be achieved by varying either the durationof each pulses or the total duration of all of the pulses, with voltagemagnitude remaining constant.

Another approach is to modulate voltage magnitude, pulse duration, andtotal duration of all pulses. Another approach is to modulateprogramming current instead of programming voltage or time.

FIG. 23 depicts waveforms for high voltage generation when multiplewords of bits are to be programmed. Signal 2302 is an exemplary HVvoltage (such as a high voltage level for SL, CG, and EG) applied tomemory cell for programming. Signal 2304 is an exemplary data in [N:1],and its value controls the number of IO bits to be programmed. Signal2305 controls the program pulsewidth individually for each IO. As shownin timing 2306, going low means enabling programming and going highmeans disabling programming. Signal 2305 depicts all IO bits going lowon different falling edges but going high on the same rising edge. Thisis to ensure that during a program pulse, the internal high voltagelevel is going lower during the timing 2306 (as more bits are enabled tobe programmed, leading to more current loading, meaning more IR dropduring 2306 timing going from left to right as shown in timing 2306), toavoid possible program overshoot that would otherwise occur.

FIG. 24 depicts a block diagram of a VMM system 2400. The VMM systemcomprises VMM matrix 2408, row decoders 2407, high voltage decoders2409, column decoders 2410, and bit line drivers 2411. VMM system 2400further comprises high voltage generation block 2412, which comprisescharge pump 2401, charge pump regulator 2402, and high voltage levelgenerator 2403. VMM system 2400 further comprises algorithm controller2404, analog circuitry 2405, and control logic 2406.

FIG. 25 provides further detail regarding charge pump 2401 and chargepump regulator 2402. Charge pump 2401 is controlled by enable signal2501. When enable signal 2501 is not asserted, charge pump 2401continues increasing the voltage of its output. When enable signal 2501is asserted, charge pump 2401 maintains the voltage level of its output.Charge pump regulator 2402 comprises a series of diodes 2504, 2506, and2508 and resistors 2505, 2507, and 2509. A node within that structure isinput to comparator 2503, which receives another input comprising avoltage reference. When the voltage output from charge pump 2401 issufficient to activate diodes 2504, 2506, and 2508, then current willflow into comparator 2503, and the enable signal will be asserted. Thus,charge pump regulator 2404 controls charge pump 2401 until the desiredvoltage level is achieved, which is based on the characteristics ofdiodes 2504, 2506, and 2508 and resistors 2505, 2507, and 2509.

FIG. 26 depicts VMM system 2400 used with high voltage buffer 2601 andadjustable current sink 2602. High voltage generator block 2412generates a voltage that is provided to high voltage buffer 2601, whichin turn provides that voltage to high voltage decoder 2409 andadjustable current sink (program compensation current Icomp) 2602. Thecurrent drawn by adjustable current sink Icomp 2602 can be adjusted to,for example, induce a compensated voltage drop within high voltagebuffer 2601 to compensate for the number of IOs to be programmed (e.g.,dVout1/2/ . . . /32 drop for 1/2/ . . . /32 IOs to be programmed) and toreduce the temperature of high voltage buffer 2601. For example Icomp α(# IOs to be programmed)*Iprog*M. Iprog=cell programming current,M=multiplier factor due to memory cell hot carrier effect in program.The compensation Icomp is applied to maintain a constant high voltageoutput over varying output load.

FIG. 27 depicts VMM system 2400 used with high voltage buffer 2701 andadjustable current sink 2702. High voltage generator 2412 generates avoltage that is provided to high voltage buffer 2701, which in turnprovides that voltage to high voltage decoder 2409. The current drawn byadjustable current sink (compensation current) Icomp 2702 can beadjusted to, for example, reduce the current drop (as a function ofnumber of IOs to be programmed) within high voltage decoder 2409 toreduce the temperature of high voltage decoder 2409. For example Icomp α(# IOs to be programmed)*Iprog*M. Iprog=cell programming current,M=multiplier factor due to memory cell hot carrier effect in program.The compensation Icomp is applied to maintain a constant high voltageoutput over varying output load.

FIG. 28 depicts VMM system 2400 used with high voltage buffer 2801,which here is an operational amplifier. High voltage generator 2412generates a voltage that is provided to high voltage buffer 2701, whichin turn provides that voltage to high voltage decoder 2409. An outputfrom high voltage decoder 2409 (e.g., the output is an feedbackindicator of HV voltage in array) is provided as an input to highvoltage buffer 2801, which then operates as a closed loop comparator.The closed loop compensation is applied to maintain a constant highvoltage output over varying output load.

FIG. 29 depicts program current compensation block 2900 to be used inconjunction with VMM system 2400. Here, a dummy program bit line(programmable dummy array) is provided with each group of 32 bit lines.For example, group 2901 includes dummy bit line 2903, and group 2902includes dummy bit line 2904. These dummy bitlines 2903 and 2904 can beturned on in instances where one or more other bits in groups 2901 and2902, respectively, are not being programmed. This will keep the currentdrawn during a programming operation more constant than would be thecase without the use of dummy bit lines 2903 and 2904. The program dummyarray compensation scheme is applied to maintain a constant high voltageoutput over varying output load.

FIG. 30 depicts an example of a high voltage decoder block 3000 that canbe used in high voltage decoder 2409. Here, source line 3005 is coupledto one or two rows in array 2408. NMOS transistors 3001, 3002, 3003, and3004 are coupled to source line 3005 as shown. HV supply 3010 is such asfrom a HV buffer and HV comp signal 3011 is such as shown in FIG. 28.

FIG. 31 depicts test circuit 3100. Test circuit comprises high voltagetransmitter 3101, which receives an enable signal EN. High voltagetransmitter provides a high voltage enable signal to NMOS transistor3102 and to NMOS cascode transistor 3103. One terminal of NMOStransistor 3201 connects to an external test pad, and one terminal ofNMOS transistor 3103 is coupled to an internal node within VMM system2400. This circuit is used such as for voltage calibration.

FIG. 32 depicts an embodiment of high voltage generation block 2412.

FIG. 33 depicts another embodiment of high voltage generation block2412. Here, high voltage generation block comprises charge pump 3301,charge pump regulator 3303, and high voltage operational amplifier 3302.The voltage of the output of charge pump regulator 3303 can becontrolled based on the signals sent to the gates of the NMOStransistors in charge pump regulator 3303.

FIG. 34 depicts another embodiment of high voltage generation block2412. High voltage generation block 2412 comprises high voltageoperational amplifier 3403, SC (switch cap) network 3402, and SC network3401. SC network 3402 comprises adjustable capacitor 3404. SC network3401 comprises switches 3405, 3407, 3408, and 3409 and adjustablecapacitor 3406.

FIG. 35 depicts high voltage operational amplifier 3500, which can beused for high voltage operational amplifier 3404 in FIG. 34. Highvoltage operational amplifier 3500 comprises the components shown in thearrangement shown.

FIG. 36 depicts high voltage operational amplifier 3600, which can beused for high voltage operational amplifier 3404 in FIG. 34. Highvoltage operational amplifier 3600 comprises the components shown in thearrangement shown.

FIG. 37 depicts column driver 3700, which can be used for bit linedrivers 2411. Column driver 3700 comprises latch 3701, inverter 3702,NOR gate 3703, PMOS transistor 3704, NMOS transistors 3705 and 3706 andsense amplifier 3707, in the configuration shown.

FIG. 38 depicts sense amplifier 3800, which can be used for senseamplifier 3707 in FIG. 37. Sense amplifier 3800 comprises adjustablecurrent reference source 3801, switch 3802, NMOS transistor 3803,capacitor 3804, switch 3805, current source 3806, and inverter 3807, inthe configuration shown. Sense amplifier 3707 is coupled to memory cell3808 in array 2408.

FIG. 39 depicts reference array circuitry 3900, comprising bit linereference decoder 3901 and reference cells 3901 ₀ to 3902 _(N).

FIG. 40 depicts reference array circuitry 4000, comprising bit linereference decoder 4001 and reference cells 4002 ₀ to 4000 _(N).

It should be noted that, as used herein, the terms “over” and “on” bothinclusively include “directly on” (no intermediate materials, elementsor space disposed therebetween) and “indirectly on” (intermediatematerials, elements or space disposed therebetween). Likewise, the term“adjacent” includes “directly adjacent” (no intermediate materials,elements or space disposed therebetween) and “indirectly adjacent”(intermediate materials, elements or space disposed there between),“mounted to” includes “directly mounted to” (no intermediate materials,elements or space disposed there between) and “indirectly mounted to”(intermediate materials, elements or spaced disposed there between), and“electrically coupled” includes “directly electrically coupled to” (nointermediate materials or elements there between that electricallyconnect the elements together) and “indirectly electrically coupled to”(intermediate materials or elements there between that electricallyconnect the elements together). For example, forming an element “over asubstrate” can include forming the element directly on the substratewith no intermediate materials/elements therebetween, as well as formingthe element indirectly on the substrate with one or more intermediatematerials/elements there between.

What is claimed is:
 1. A system for compensating for changes in currentapplied to a memory array during a programming operation, the systemcomprising: an array of non-volatile memory cells; a high voltagegenerator for generating a high voltage; a high voltage buffer forreceiving the high voltage from the high voltage generator andoutputting the high voltage; a high voltage decoder for receiving thehigh voltage from the high voltage buffer and applying the high voltageto a selected set of the non-volatile memory cells in the array during aprogramming operation; and an adjustable current sink coupled to thehigh voltage buffer for drawing a compensation current, wherein theadjustable current sink is adjusted to alter the compensation currentwhen the load on the high voltage buffer changes.
 2. The system of claim1, wherein the compensation current is proportional to the number ofcells to be programmed.
 3. The system of claim 1, wherein the memoryarray is a vector-by-matrix multiplication array.
 4. The system of claim2, wherein the memory array is a vector-by-matrix multiplication array.5. The system of claim 1, wherein the non-volatile memory cells aresplit-gate flash memory cells.
 6. A method for compensating for changesin current applied to an array of non-volatile memory cells during aprogramming operation, the method comprising: generating, by a highvoltage generator, a high voltage; receiving, by a high voltage buffer,the high voltage from the high voltage generator; receiving, by a highvoltage decoder, the high voltage from the high voltage buffer;applying, by the high voltage decoder, the high voltage to a selectedset of non-volatile memory cells in the array during a programmingoperation; configuring an adjustable current sink to draw a compensationcurrent in proportion to a load on the high voltage buffer; and drawing,by the adjustable current sink, the compensation current from the highvoltage buffer.
 7. The method of claim 6, wherein the load isproportional to the number of cells to be programmed.
 8. The method ofclaim 6, wherein the array is a vector-by-matrix multiplication array.9. The system of claim 7, wherein the array is a vector-by-matrixmultiplication array.
 10. The system of claim 6, wherein thenon-volatile memory cells are split-gate flash memory cells.
 11. Asystem for compensating for changes in current applied to a memory arrayduring a programming operation, the system comprising: an array ofnon-volatile memory cells; a high voltage generator for generating ahigh voltage; a high voltage buffer for receiving the high voltage fromthe high voltage generator and outputting the high voltage; a highvoltage decoder for receiving the high voltage from the high voltagebuffer and applying the high voltage to a selected set of thenon-volatile memory cells in the array during a programming operation;and an adjustable current sink coupled to the high voltage decoder fordrawing a compensation current, wherein the adjustable current sink isadjusted to alter the compensation current when the load on the highvoltage decoder changes.
 12. The system of claim 11, wherein thecompensation current is proportional to the number of cells to beprogrammed.
 13. The system of claim 11, wherein the memory array is avector-by-matrix multiplication array.
 14. The system of claim 12,wherein the memory array is a vector-by-matrix multiplication array. 15.The system of claim 11, wherein the non-volatile memory cells aresplit-gate flash memory cells.
 16. A method for compensating for changesin current applied to an array of non-volatile memory cells during aprogramming operation, the method comprising: generating, by a highvoltage generator, a high voltage; receiving, by a high voltage buffer,the high voltage from the high voltage generator; receiving, by a highvoltage decoder, the high voltage from the high voltage buffer;applying, by the high voltage decoder, the high voltage to a selectedset of non-volatile memory cells in the array during a programmingoperation; configuring an adjustable current sink to draw a compensationcurrent in proportion to a load on the high voltage decoder; anddrawing, by the adjustable current sink, the compensation current fromthe high voltage decoder.
 17. The method of claim 16, wherein the loadis proportional to the number of cells to be programmed.
 18. The methodof claim 16, wherein the array is a vector-by-matrix multiplicationarray.
 19. The method of claim 17, wherein the array is avector-by-matrix multiplication array.
 20. The method of claim 16,wherein the non-volatile memory cells are split-gate flash memory cells.